class ClassroomRegistration
  include DataMapper::Resource
  storage_names[:default] = "ClassroomRegistration"
  
  property :id,                  Serial
  property :classroom_id,        Integer,       :required => true
  property :profile_id,          Integer,       :required => true
  property :expected_start_date, Date
  property :expected_value,      Integer
  property :status,              Integer,       :required => true
  property :expected_city_id,    Integer
  property :description,         Text,          :lazy => false
  timestamps :at

  belongs_to :classroom
  belongs_to :profile
  belongs_to :expected_city, 'City',
    :parent_key => [:id],
    :child_key => [:expected_city_id],
    :require => true
end
